package com.leesk.trial.springbootdatastatistics.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;

import java.util.List;

/**
 * @Author: leesk
 * @Description:
 * @Date: Create in 17:07 2020/11/21
 */
@Data
@AllArgsConstructor
public class Country implements Comparable<Country> {
    private String country;         //  国家
    private int confirmed;       //  累计确诊
    private int deaths;          //  累计死亡
    private int recovered;       //  累计治愈

    private List<Province> provinceList;    //  城市列表

    @Override
    public int compareTo(Country c) {
        if (this.confirmed < c.confirmed) {
            return 1;
        } else if (this.confirmed > c.confirmed) {
            return -1;
        }
        return 0;
    }
}
